import request from '~/utils/resquest'

//  单灯控制器-列表
export const lampcontrolListGet = <T>(params: T) => {
  return request({ url: '/api/gxsaas-assets/lampcontrol/list', method: 'GET', params })
}

//  单灯控制器-删除
export const lampcontrolRemovePost = <T>(params: T) => {
  return request({ url: '/api/gxsaas-assets/lampcontrol/remove', method: 'POST', params })
}

//  单灯控制器-导出
export const lampcontrolExportGet = <T>(payload: T) =>
  request({
    url: '/api/gxsaas-assets/lampcontrol/export',
    method: 'GET',
    responseType: 'blob',
    ...payload
  })

//  单灯控制器-模版下载
export const lampcontrolExportTemplateGet = <T>(payload: T) =>
  request({
    url: '/api/gxsaas-assets/lampcontrol/export-template',
    method: 'GET',
    responseType: 'blob',
    ...payload
  })

// 单灯控制器-导入
export const lampcontrolImportExcelGet = <T>(params: T) =>
  request({
    url: '/api/gxsaas-assets/lampcontrol/import-excel',
    method: 'post',
    data: params
  })

//  单灯控制器-型号
export const lampcontrolModelGet = <T>(params: T) => {
  return request({ url: '/api/gxsaas-assets/model/getLampModel', method: 'GET', params })
}

//  单灯控制器-详情
export const lampcontrolViewGet = <T>(params: T) => {
  return request({ url: '/api/gxsaas-assets/lampcontrol/view', method: 'GET', params })
}

//  单灯控制器-新增
export const lampcontrolAddPost = <T>(data: T) => {
  return request({ url: '/api/gxsaas-assets/lampcontrol/add', method: 'POST', data })
}

//  单灯控制器-修改
export const lampcontrolUpdatePost = <T>(data: T) => {
  return request({ url: '/api/gxsaas-assets/lampcontrol/update', method: 'POST', data })
}
